#pragma once
#include "fxcc/core/MetaCache.h"

struct ModelMetaCache
{
	std::vector<MetaMapIndex> m_MeshMetaIndexes;
	std::vector<MetaMapIndex> m_SkinnedMetaIndexes;
	std::vector<MetaMapIndex> m_BoneMetaIndexes;
	std::vector<MetaMapIndex> m_MaterialMetaIndexes;
	std::vector<MetaMapIndex> m_RealMaterialMetaIndexes;
	std::vector<MetaMapIndex> m_AnimationMetaIndexes;

	void Clear()
	{
		m_MeshMetaIndexes = {};
		m_SkinnedMetaIndexes = {};
		m_BoneMetaIndexes = {};
		m_MaterialMetaIndexes = {};
		m_RealMaterialMetaIndexes = {};
		m_AnimationMetaIndexes = {};
	}
	void Add(const ModelMetaCache& other)
	{
		m_MeshMetaIndexes.insert(m_MeshMetaIndexes.end(), other.m_MeshMetaIndexes.begin(), other.m_MeshMetaIndexes.end());
		m_SkinnedMetaIndexes.insert(m_SkinnedMetaIndexes.end(), other.m_SkinnedMetaIndexes.begin(), other.m_SkinnedMetaIndexes.end());
		m_BoneMetaIndexes.insert(m_BoneMetaIndexes.end(), other.m_BoneMetaIndexes.begin(), other.m_BoneMetaIndexes.end());
		m_MaterialMetaIndexes.insert(m_MaterialMetaIndexes.end(), other.m_MaterialMetaIndexes.begin(), other.m_MaterialMetaIndexes.end());
		m_RealMaterialMetaIndexes.insert(m_RealMaterialMetaIndexes.end(), other.m_RealMaterialMetaIndexes.begin(), other.m_RealMaterialMetaIndexes.end());
		m_AnimationMetaIndexes.insert(m_AnimationMetaIndexes.end(), other.m_AnimationMetaIndexes.begin(), other.m_AnimationMetaIndexes.end());

	}
};

struct ModelMetaCacheFile
{
	std::map<std::string, ModelMetaCache> m_ModelMetaCache;
};
